package com.yorick.common.config.rabbitmq.callback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

import java.util.logging.Logger;

@Slf4j
public class RabbitReturnCallBack implements RabbitTemplate.ReturnCallback {


    @Override
    public void returnedMessage(Message message, int i, String s, String s1, String s2) {
        log.info("消息主体: "+ message);
        log.info("回复编码: "+ i);
        log.info("回复内容: "+ s);
        log.info("交换器: "+ s1);
        log.info("路由键: "+ s2);
    }
}
